package com.cy.pj.common.pojo;

public class ResponseResult {
    /*响应状态码*/
    private Integer state=1;//1表示ok，0表示error，。。。。。
    /*状态码对应的信息*/
    private String messaage="ok";
    /*正确的响应数据*/
    private Object data;

    public ResponseResult(){}

    public ResponseResult(String messaage){//new ResponseResult("delete ok")
        this.messaage=messaage;
    }
    public ResponseResult(Object data){//new ResponseResult(list);
        this.data=data;
    }
    public ResponseResult(Throwable e){//new ResponseResult(e);
        this.state=0;
        this.messaage=e.getMessage();
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public String getMessaage() {
        return messaage;
    }

    public void setMessaage(String messaage) {
        this.messaage = messaage;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
